﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "dingqiweihujilu")]
    public class DingQiWeiHuJiLu
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "bzzbtid")]
        [JsonProperty("bzzbtid")]
        [Description("保障装备类型ID")]
        public long Bzzbtid { get; set; }

        [Column(Name = "bzzbid")]
        [JsonProperty("bzzbid")]
        [Description("保障装备ID，车辆类或者设备类ID")]
        public long Bzzbid { get; set; }

        [Column(Name = "jtid")]
        [JsonProperty("jtid")]
        [Description("具体车辆或者设备ID")]
        public long Jtid { get; set; }

        [Column(Name = "gjid")]
        [JsonProperty("gjid")]
        [Description("具体车辆或者设备下的构件ID")]
        public long Gjid { get; set; }

        [Column(Name = "iotid")]
        [JsonProperty("iotid")]
        [Description("IOT传感器记录ID")]
        public long Iotid { get; set; }

        [Column(Name = "kzjwybs")]
        [JsonProperty("kzjwybs")]
        [Description("控制件唯一标识")]
        public string Kzjwybs { get; set; }

        [Column(Name = "kzjlx")]
        [JsonProperty("kzjlx")]
        [Description("控制件类型")]
        public string Kzjlx { get; set; }

        [Column(Name = "kzxmc")]
        [JsonProperty("kzxmc")]
        [Description("控制项名称")]
        public string Kzxmc { get; set; }

        [Column(Name = "kzlx")]
        [JsonProperty("kzlx")]
        [Description("控制类型")]
        public string Kzlx { get; set; }

        [Column(Name = "jsxmc")]
        [JsonProperty("jsxmc")]
        [Description("计时项名称")]
        public string Jsxmc { get; set; }

        [Column(Name = "qssj", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("qssj")]
        [Description("起始时间")]
        public DateTime Qssj { get; set; }

        [Column(Name = "ljgzsj")]
        [JsonProperty("ljgzsj")]
        [Description("累计工作时间")]
        public string Ljgzsj { get; set; }

        [Column(Name = "ljsyl")]
        [JsonProperty("ljsyl")]
        [Description("累计使用量")]
        public int Ljsyl { get; set; }

        [Column(Name = "jldw")]
        [JsonProperty("jldw")]
        [Description("计量单位")]
        public string Jldw { get; set; }

        [Column(Name = "scgzrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("scgzrq")]
        [Description("上次工作日期")]
        public DateTime Scgzrq { get; set; }

        [Column(Name = "lhdw")]
        [JsonProperty("lhdw")]
        [Description("L/H单位")]
        public string Lhdw { get; set; }

        [Column(Name = "ldw")]
        [JsonProperty("ldw")]
        [Description("L单位")]
        public string Ldw { get; set; }

        [Column(Name = "kmdw")]
        [JsonProperty("kmdw")]
        [Description("km单位")]
        public string Kmdw { get; set; }

        [Column(Name = "cidw")]
        [JsonProperty("cidw")]
        [Description("次单位")]
        public string Cidw { get; set; }

        [Column(Name = "tiandw")]
        [JsonProperty("tiandw")]
        [Description("天单位")]
        public string Tiandw { get; set; }

        [Column(Name = "hdw")]
        [JsonProperty("hdw")]
        [Description("h单位")]
        public string Hdw { get; set; }

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
